/***************************************************************
*
* ALLOCATOR.HPP
*Test
* 
***************************************************************/

/***************************************************************
* dsALLOCATOR::dsALLOCATOR(void)
* 
***************************************************************/
template <typename T>
dsALLOCATOR<T>::dsALLOCATOR (void)
{
   node.size      = 10;
   node.blockPtr  = new T(sizeof(T)*node.size);
   node.isFree    = true;

   blocks.push_back(node);
}

/***************************************************************
* dsALLOCATOR::dsALLOCATOR(size_t initSize)
* 
***************************************************************/
template <typename T>
dsALLOCATOR<T>::dsALLOCATOR (size_t size)
{
   node.size      = size;
   node.blockPtr  = new T(sizeof(T)*node.size);
   node.isFree    = true;

   blocks.push_back(node);
}

/***************************************************************
* dsALLOCATOR::~dsALLOCATOR(void)
* 
***************************************************************/
template <typename T>
dsALLOCATOR<T>::~dsALLOCATOR(void)
{
   std::list::iterator li = blocks.begin();
   while (li != blocks.end()){
      delete li->blockPtr;
   }
   blocks.clear();
}



template <typename T>
void dsALLOCATOR<T>::Allocate(T *dst, T *src, size_t size) 
{

}